package juc.sync;

public class SyncDemo2 {

    private static int counter=0;

    private static String lock="";

    public static void increment(){
        synchronized (lock){
            counter++;
        }
    }
    public static void decrement(){
        synchronized (lock){
            counter--;
        }
    }

}
